package com.baijiaoxi.utils.qcloud;

import lombok.Data;

@Data
public class ObjectInfo {
    private Long size; // 除以1024是kb
    private String contentType;
    private int fileType;//默认 1 pdf 2视频 3图片

    public void setContentType(String contentType) {
        this.contentType = contentType;
        if (contentType != null) {
            if (contentType.startsWith("video"))
                this.fileType = 2;
            else if (contentType.startsWith("image"))
                this.fileType = 3;
            else this.fileType = 1;
        }
    }
}
